/*
 *
 * Copyright (c) 2001-2011 keyTool IUI Project.
 * LGPL License.
 * http://code.google.com/p/keytool-iui/
 *
 * This software is the confidential and proprietary information of RagingCat Project.
 * You shall not disclose such confidential information and shall use it only in
 * accordance with the terms of RagingCat Project's license agreement.
 *
 * THE SOFTWARE IS PROVIDED AND LICENSED "AS IS" WITHOUT WARRANTY OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 
 *
 * LICENSE FOR THE SOFTWARE DOES NOT INCLUDE ANY CONSIDERATION FOR ASSUMPTION OF RISK
 * BY KEYTOOL IUI PROJECT, AND KEYTOOL IUI PROJECT DISCLAIMS ANY AND ALL LIABILITY FOR INCIDENTAL
 * OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF OR INABILITY
 * TO USE THE SOFTWARE, EVEN IF KEYTOOL IUI PROJECT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 
 *
 */
 
 
 package com.google.code.p.keytooliui.shared.swing.table;
 
 /**

 **/
 
 import com.google.code.p.keytooliui.shared.lang.*;
 
 import javax.swing.*;
 
 import java.awt.*;
 
 final public class TCRHeader extends TCRAbs
 {
    // -------------------
    // FINAL STATIC PUBLIC
    
    final static public Color f_s_colFgDefault = Color.black;
    final static public Color f_s_colBgDefault = new Color(240, 230, 220);
    
    // --------------
    // STATIC PRIVATE
    
    static private String _s_strTip = null;
    
    // ------------------
    // STATIC INITIALIZER

    static
    {
       
        
        try
        {
            String strBundleFileShort =
                com.google.code.p.keytooliui.shared.Shared.f_s_strBundleDir +
                ".TCRHeader" // class name
            ;
            
            String strBundleFileLong = strBundleFileShort + ".properties";
        
            java.util.ResourceBundle rbeResources = java.util.ResourceBundle.getBundle(
                strBundleFileShort, 
                java.util.Locale.getDefault());
                
            TCRHeader._s_strTip = rbeResources.getString("tip");
        }
        
        catch (java.util.MissingResourceException excMissingResource)
        {
            String strWhere = "com.google.code.p.keytooliui.shared.swing.table.TCRHeader";
            excMissingResource.printStackTrace();
            MySystem.s_printOutExit(strWhere, "excMissingResource caught");
            
        }
    }
    
    
    // ------
    // PUBLIC
    
    public Component getTableCellRendererComponent(
	    JTable table,
        Object value,
        boolean isSelected,
        boolean hasFocus,
        int row,
        int column)
    {
        Component cmp = super.getTableCellRendererComponent(
            table, value, isSelected, hasFocus, row, column);
            
        setBorder(BorderFactory.createRaisedBevelBorder()); 
                
        return cmp;
    }
            
    
    public TCRHeader()
    {
        super();
        
        setForeground(TCRHeader.f_s_colFgDefault);
        setBackground(TCRHeader.f_s_colBgDefault);
        setToolTipText(TCRHeader._s_strTip);
    }
 }